﻿<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>子女信息</title>
	<link rel="stylesheet" href="css/common2.css">
	<style>
		.school {
			margin-left: 2%;
			margin-top: 20px;
			display: inline-block;
		}

		.device_input {
			width: 170px;
			height: 36px;
			border-radius: 6px;
			border: solid 1px #1E9FFF;
			padding-left: 20px;
			background: none;
			font-size: 14px;
			color: #686868;
			display: inline-block;
			margin-left: 1%;
		}
	</style>
</head>

<body class="main-body">
	<div id="vue-root" style="margin-top: 50px;">
	
		<div class="refresh" onclick="location.reload()">刷新</div>

		<form @submit.prevent="getData0">
		
			<input class="search" placeholder="请输入学生姓名" v-model="search.studentName"
				style="position: absolute; right: 255px; height: 33px; max-width: 118px;">
			<input class="search" placeholder="请输入家长姓名" v-model="search.parentName "
				style="position: absolute; right: 100px; height: 33px; max-width: 118px;">
			<!-- <input class="search" placeholder="请输入设备地点" v-model="search.name"
				style="position: absolute; right: 100px; height: 33px; max-width: 118px;"> -->
			<input type="submit" style="display: none;">
		</form>

		<img src="image/search.png" height="35" width="35" class="search_img" @click="getData0"
			style="position: absolute; right: 3%;">
		<br>

		<div class="table ">
			<table class="table_top">
				<thead>
					<tr>
						<th class="two">
							<input type="checkbox" class="check-box" v-model="all">
						</th>
						<th>序号</th>
						<th>家长姓名</th>
						<th>学生姓名</th>
						<th>学生性别</th>
						<th>关系</th>
						<th>出生日期</th>
						<th>年龄</th>
						<th>过敏史</th>

						<th>特殊需求</th>
						<th>医疗备注信息</th>
						<!-- <th>出生日期</th>
						<th>编辑/删除</th> -->
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(device,index) in list" :key="device.id">
						<td>
							<input type="checkbox" class="check-box" v-model="device.checked">
						</td>
						<td><span v-text="index+1"></span></td>
						<td v-text="device.parentName"></td>
						<td v-text="device.studentName"></td>
						<td v-text="device.gender"></td>
						<td class="text" v-text="device.relation"></td>
						<td v-text="device.birthday"></td>

						<td v-text="device.age"></td>
						<td v-text="device.allergy"></td>
						<td v-text="device.needs"></td>
						<td v-text="device.medicalNote"></td>
						<!-- <td>
							<div class="option">
								<div class="edit-icon option-icon">
									<a :href="'device_item.html?id='+device.id"
										style="position: absolute; left: 20%; top: 30%;">
										<img class="img" src="../image/edit.png" height="20" width="20"
											onmouseover="this.src='image/edit_light.png'"
											onmouseout="this.src='image/edit.png'" />
									</a>
								</div>
								<div class="delete-icon option-icon" @click="del([device.id])"
									style="right: 20%; top:30%;position: absolute;">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='image/delete_light.png'"
										onmouseout="this.src='image/delete.png'" />
								</div>
							</div>
						</td> -->
					</tr>
				</tbody>
			</table>
		</div>

		<form enctype="multipart/form-data" id="form" ref="form" style="display: none;">
			<input type="file" name="file" id="file" @change="importExcel" ref="file"
				accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel">
		</form>
		<div class="delete long-background-img" @click="exports">批量导出</div>
		<!-- <div class="delete" @click="batchDelete" v-if="total>1">批量删除</div>
	
		<div class="delete long-background-img">
			<label for="file">批量导入</label>
		</div> -->

		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
			<li>
				<a v-text="pages"></a>
				<!--页面总数-->
			</li>
		</ul>
		<div style="float: right;margin-bottom: 20px;">
			总共{{total}}条记录
			<select class="ui-select init" style="height:32px" v-model="pageSize">
				<!--style="margin-top: 14px;"-->
				<option :value="10">每页10条</option>
				<option :value="30">每页30条</option>
				<option :value="100">每页100条</option>
			</select>
		</div>

	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="js/common.js"></script>
	<script src="js/list.js"></script>

	<script>

		var app = new Vue(merge({
			data: {
				agents: [],
				search: {
					type1: params().type1,
					active: params().active
				},
				urls: {
					list: '/api/studentXcx/list',
					del: '/pc/device/del',
					imports: '/pc/device/import',
				},
				query: location.search
			},
			methods: {
				exports: function () {
					var q = Qs.stringify(this.search);
					if (q) q = '?' + q;
					location.href = '/api/studentXcx/export' + q;
				}
			}
		}));
	</script>


</body>

</html>